package net.ericaro.neojavagen.expressions;

/**
 * <b>PrimaryArrayAccess</b> ::= <{@link net .ericaro .neojavagen .expressions .PrimaryNoNewArray PrimaryNoNewArray}> "[" <
 * {@link net .ericaro .neojavagen .expressions .Expression Expression}> "]"
 * 
 * @author eric@ericaro.net
 */
public class PrimaryArrayAccess extends net.ericaro.neojavagen.JavaPartComposition implements net.ericaro.neojavagen.expressions.ArrayAccess {
	private net.ericaro.neojavagen.expressions.Expression expression;

	private net.ericaro.neojavagen.expressions.PrimaryNoNewArray primaryNoNewArray;

	public PrimaryArrayAccess(net.ericaro.neojavagen.expressions.PrimaryNoNewArray primaryNoNewArray, net.ericaro.neojavagen.expressions.Expression expression) {
		super();
		this.primaryNoNewArray = primaryNoNewArray;
		this.expression = expression;
	}

	public net.ericaro.neojavagen.expressions.Expression getExpression() {
		return expression;
	}

	public net.ericaro.neojavagen.expressions.PrimaryNoNewArray getPrimaryNoNewArray() {
		return primaryNoNewArray;
	}

	public void setExpression(net.ericaro.neojavagen.expressions.Expression expression) {
		this.expression = expression;
	}

	public void setPrimaryNoNewArray(net.ericaro.neojavagen.expressions.PrimaryNoNewArray primaryNoNewArray) {
		this.primaryNoNewArray = primaryNoNewArray;
	}

	@Override
	public java.lang.String toString() {
		return print(primaryNoNewArray, "[", expression, "]");
	}
}
